package com.designpatterns.observer.classto;

import com.designpatterns.observer.interfaceto.Observer;
import com.designpatterns.observer.interfaceto.Subject;

/**
 * 模拟第二个使用者
 */
public class ObserverUser1 implements Observer {


    @Override
    public void update(String msg) {
        System.out.println("----ObserverUser1得到3D号码"+msg +" 我要记下来");
    }


    public ObserverUser1(Subject subject) {
        subject.registerObserver(this);
    }
}
